package com.linchuansi.service;

import com.linchuansi.framework.Autowired;
import com.linchuansi.framework.BeanNameAware;
import com.linchuansi.framework.Comment;
import com.linchuansi.framework.Value;

@Comment
public class UserService implements BeanNameAware {
    @Value(value = "linchuansi")
    private String name;
    @Autowired
    private OrderService orderService;
    private String beanName;
    @Override
    public void setBeanName(String beanName) {
        System.out.println("获取到了beanName="+beanName);
        this.beanName=beanName;
    }

    public UserService(String name) {
        this.name = name;
    }

    public UserService(String name, OrderService orderService) {
        this.name = name;
        this.orderService = orderService;
    }

    public UserService(String name, OrderService orderService, String beanName) {
        this.name = name;
        this.orderService = orderService;
        this.beanName = beanName;
    }

    public void test()
    {
        System.out.println(name);
    }
    public void test2()
    {

    }
}